package JasPerl::ResponseWrapper;

use strict;
use warnings;

sub is_committed            { $_[0]->get_request()->is_committed() }
sub flush_buffer            { $_[0]->get_request()->flush_buffer() }
sub reset_buffer            { $_[0]->get_request()->reset_buffer() }
sub reset                   { $_[0]->get_request()->reset() }

sub set_status              { $_[0]->get_request()->set_status($_[1]) }

sub contains_header         { $_[0]->get_request()->set_header($_[1]) }
sub set_header              { $_[0]->get_request()->set_header($_[1], $_[2]) }
sub add_header              { $_[0]->get_request()->add_header($_[1], $_[2]) }

sub get_character_encoding  { $_[0]->get_request()->get_character_encoding() }
sub set_character_encoding  { $_[0]->get_request()->set_character_encoding($_[1]) }
sub get_content_type        { $_[0]->get_request()->get_content_type() }
sub set_content_type        { $_[0]->get_request()->set_content_type($_[1]) }
sub set_content_length      { $_[0]->get_request()->set_content_length($_[1]) }

sub get_writer              { $_[0]->get_request()->get_writer() }

sub get_locale              { $_[0]->get_request()->get_locale() }
sub set_locale              { $_[0]->get_request()->set_locale($_[1]) }

sub add_cookie              { $_[0]->get_request()->add_cookie($_[1]) }

sub encode_url              { $_[0]->get_request()->encode_url($_[1]) }
sub encode_redirect_url     { $_[0]->get_request()->encode_redirect_url($_[1]) }

sub send_redirect           { $_[0]->get_request()->send_redirect($_[1]) }
sub send_error              { $_[0]->get_request()->send_error($_[1], $_[2]) }

1;
